<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>ActiveSupport::InheritableOptions</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            ActiveSupport::InheritableOptions 
            
                <span class="parent">&lt; 
                    
                    <a href="OrderedOptions.html">ActiveSupport::OrderedOptions</a>
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/activesupport/lib/active_support/ordered_options_rb.html">activesupport/lib/active_support/ordered_options.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>I</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="InheritableOptions.html#method-i-inheritable_copy">inheritable_copy</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="InheritableOptions.html#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>(parent = nil)
            
            <a href="InheritableOptions.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/d71d5ba71fadf4219c466c0332f78f6e325bcc6c/activesupport/lib/active_support/ordered_options.rb#L44" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/ordered_options.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">parent</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">OrderedOptions</span>)
    <span class="ruby-comment"># use the faster _get when dealing with OrderedOptions</span>
    <span class="ruby-keyword">super</span>() { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">_get</span>(<span class="ruby-identifier">k</span>) }
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">parent</span>
    <span class="ruby-keyword">super</span>() { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">parent</span>[<span class="ruby-identifier">k</span>] }
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">super</span>()
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-inheritable_copy">
            
              <b>inheritable_copy</b>()
            
            <a href="InheritableOptions.html#method-i-inheritable_copy" name="method-i-inheritable_copy" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-inheritable_copy_source')" id="l_method-i-inheritable_copy_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/d71d5ba71fadf4219c466c0332f78f6e325bcc6c/activesupport/lib/active_support/ordered_options.rb#L55" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-inheritable_copy_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/ordered_options.rb, line 55</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">inheritable_copy</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    